1. Field of the Invention
The present invention relates to transaction models for data systems and, more particularly, to techniques for implementing nested databases using ignore conflicts relationships and lock delegation.
2. Description of the Related Art
A concurrency control approach based on nested databases was defined by Anfindsen (see generally, Ole Jorgen Anfindsen, Apotram-An Application-Oriented Transaction Model, Doctor Scient Thesis, UNIK Center for Technology at Kjeller, Department of Informatics, University of Oslo, Norway, Research Report 215, pp. 45-52, 1997) and has since been developed as the APOTRAM(trademark) implementation of a transaction model. APOTRAM(trademark) is a trademark of Telenor AS, Oslo, Norway.
In summary, the nested database techniques described by Anfindsen provided concurrency controls that facilitate update (generally, write access) to a given data item in a controlled manner. Execution of a nested transaction was viewed as a dynamically developing hierarchy of spheres of control (SOCs). Write spheres of control (WSOCs) were viewed as a special case of a database and, in particular, Anfindsen proposed allowing a write sphere of control (WSOC) to be dynamically converted to a database SOC at the will of the owning transaction. In doing so, the transaction in question created a subdatabase and could decide exactly which transactions should be allowed to access the subdatabase, and in which access modes. The subdatabase was converted back to a WSOC when no transactions were active inside it, and the owning transaction had control over the enclosed data item is if and when the contents of the subdatabase were committed to the enclosing database.
Anfindsen combined and integrated the notion of nested conflict serializability (NCSR) with conditional conflict serializability (CCSR) to provide a framework that dealt in a systematic way with read-write, write-read and write-write conflicts. In general, CCSR is a superset of the conflict serializability (CSR) correctness criterion that is enforced by the Atomicity, Consistency, Isolation and Durability (ACID) transaction model, the transaction model universally supported by OLTP and database systems. In transaction processing systems (TPSs) conforming to the CSR correctness criterion, conflicts between transactions are based on the commutativity of operations. In general, a conflict resulting from a request for a lock in mode M1 against a lock held in mode M2 can be described as an M1-M2 conflict. For the typical case of operations categorized as reads or writes, the CSR correctness criterion prevents any read-write, write-read, and write-write conflict. The CCSR correctness criterion weakens constraints in an application-defined way by allowing read-write and write-read pairs of operations to conflict conditionally (i.e., according to some application-defined condition).
If subdatabases can be nested to arbitrary depths, transaction histories in subdatabases are CSR, and transactions in subdatabase histories commit to the subdatabase owner, then the resulting transaction history will be nested conflict serializable (NCSR). Nested databases and transaction histories that conform to the NCSR correctness criterion can provide a mechanism for handling write-write conflicts. An implementation in which nested databases individually conform to the CCSR correctness criterion is said to be nested conditional conflict serializable (NCCSR).
A transaction processing system that supports NCCSR or NCSR would be desirable for many applications in domains like collaborative authoring/editing, CASE, CAD, or other systems in which two or more users may perform collaborative work on a set of resources (e.g., database objects, records or data). Unfortunately, commercially available transaction processing systems do not typically provide native support for nested databases. Accordingly, techniques are desired whereby nested databases may be supported in the context of transaction processing system primitives and/or constructs that are, or are likely to become, commercially available.
Techniques have been developed whereby concurrency control mechanisms such as nested databases (e.g., as defined by Anfindsen or otherwise) can be expressed in terms of operations implemented by various flexible transaction processing systems. In particular, some realizations in accordance with the present invention implement nested databases in a framework that allows specification of ignore-conflict relationships between locking capabilities and which provides a lock delegation facility.
By providing techniques that support movement of objects from a database to a subdatabase thereof, as well as termination (e.g., commit or abort) of transactions and databases (including subdatabases), realizations in accordance with the present invention can facilitate adoption and use of advanced transaction models with unconventional concurrency control mechanisms. Some realizations in accordance with the present invention allow specification of uses of parameters with lock modes and facilitate transformation of such uses into a form suitable for utilization in execution environments that support ignore-conflict relationships.